package com.wisdomparking.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.wisdomparking.bean.Parking;
import com.wisdomparking.bean.simple.SimpleParking;
import com.wisdomparking.dao.mapper.ParkingMapper;

@Component
public class ParkingDao implements ParkingMapper {
	
	@Autowired ParkingMapper parkingMapper;
	
	@Transactional
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return parkingMapper.deleteByPrimaryKey(id);
	}
	
	@Transactional
	@Override
	public int insert(Parking record) {
		return parkingMapper.insert(record);
	}
	
	@Transactional
	@Override
	public int insertSelective(Parking record) {
		return parkingMapper.insertSelective(record);
	}
	
	@Override
	public Parking selectByPrimaryKey(Integer id) {
		return parkingMapper.selectByPrimaryKey(id);
	}
	
	@Override
	public Parking selectByName(String name){
		return parkingMapper.selectByName(name);
	}
	
	@Override
	public Parking selectByIdentification(String identification){
		return parkingMapper.selectByIdentification(identification);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKeySelective(Parking record) {
		return parkingMapper.updateByPrimaryKeySelective(record);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKey(Parking record) {
		return parkingMapper.updateByPrimaryKey(record);
	}
	
	@Override
	public List<Parking> getParkingList(Map<String, Object> map) {
		return parkingMapper.getParkingList(map);
	}

	@Override
	public long getCountByParking(Map<String, Object> map) {
		return parkingMapper.getCountByParking(map);
	}
	
	@Override
	public List<Parking> getAllParkingSiteList() {
		return parkingMapper.getAllParkingSiteList();
	}
	
	@Override
	public List<SimpleParking> getDistanceParking(Map<String, Object> map){
		return parkingMapper.getDistanceParking(map);
	}

}
